<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <style>
    body {
      width: 300px;
      padding: 20px;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    h1 {
      font-size: 18px;
      margin-bottom: 15px;
      color: #333;
    }
    .section {
      margin-bottom: 15px;
    }
    button {
      background: #4285f4;
      color: white;
      border: none;
      padding: 8px 16px;
      border-radius: 4px;
      cursor: pointer;
      margin: 2px;
    }
    button:hover {
      background: #3367d6;
    }
    input[type="text"] {
      width: 100%;
      padding: 8px;
      border: 1px solid #ddd;
      border-radius: 4px;
      margin: 5px 0;
    }
    .status {
      padding: 8px;
      border-radius: 4px;
      margin: 10px 0;
      display: none;
    }
    .success {
      background: #d4edda;
      color: #155724;
      border: 1px solid #c3e6cb;
    }
    .error {
      background: #f8d7da;
      color: #721c24;
      border: 1px solid #f5c6cb;
    }
  </style>
</head>
<body>
  <h1>我的Chrome扩展</h1>
  
  <div class="section">
    <h3>当前页面操作</h3>
    <button id="getCurrentUrl">获取当前URL</button>
    <button id="highlightLinks">高亮所有链接</button>
    <button id="removeHighlight">取消高亮</button>
  </div>
  
  <div class="section">
    <h3>存储测试</h3>
    <input type="text" id="storageInput" placeholder="输入要保存的文本">
    <button id="saveData">保存数据</button>
    <button id="loadData">加载数据</button>
  </div>
  
  <div class="section">
    <h3>页面注入</h3>
    <button id="injectScript">注入自定义脚本</button>
    <button id="showAlert">显示提示</button>
  </div>
  
  <div id="status" class="status"></div>
  <div id="result" style="margin-top: 10px; padding: 8px; background: #f5f5f5; border-radius: 4px; font-size: 12px; word-wrap: break-word;"></div>
  
  <script src="popup.js"></script>
</body>
</html>
